import React from 'react';
import './item.less';
export default function Lunboitem(props) {
  //控制轮播动画
  const styleTranstorm = {
    //盒子长度
    width: `${(props.item.length + 2) * 650}px`,
    //移动距离
    transform: `translateX(${-props.index1 * 650}px)`,
    //控制速度
    transition: '0.5s cubic-bezier(0.42,0,0.58,1)',
  };
  return (
    <div className="imgitem1" style={styleTranstorm}>
      {props.item.map((item1, index) => (
        <div key={index} className="li">
          {' '}
          <img src={item1.src}></img>
          {index}
        </div>
      ))}
    </div>
  );
}
